package helper.scxml.scxml2.t0.case1_cycle.zone.s2.c0

import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.T2SNodeUnitObj.getE1R1Strategy
import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.T2SNodeUnitObj.getT1T2SNodeUnit
import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.T2SNodeUnitObj.getT3T2SNodeUnit
import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.T2SNodeUnitObj.getT5T2SNodeUnit
import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.T2SNodeUnitObj.getCycleBestT2SNodeUnit
import helper.scxml.scxml2.t0.case1_cycle.zone.c0.Helper
import helper.scxml.strategy.sNodeUnit.T2SNodeUnitHelper.T2SNodeUnit
import org.junit.Test

internal class RepeatTest {
    private fun aT0Calculate(
        repeatTimes: Int,
        sNodeUnit: T2SNodeUnit,
    ) {
        Helper.c0(
            repeatTimes,
            sNodeUnit,
        )
    }

    @Test
    fun t1_aT0Calculate() {
        aT0Calculate(
            repeatTimes = 1,
            sNodeUnit = getT1T2SNodeUnit(),
        )
    }
    //repeatTimes = 1
    //average t = 180.0
    //average c = 450.0

    @Test
    fun t2_aT0Calculate() {
        aT0Calculate(
            repeatTimes = 1000000,
            sNodeUnit = getE1R1Strategy(),
        )
    }
    //repeatTimes = 1000000
    //average t = 181.322209
    //average c = 405.734493

    @Test
    fun t3_aT0Calculate() {
        aT0Calculate(
            repeatTimes = 1000000,
            sNodeUnit = getT3T2SNodeUnit(),
        )
    }
    //repeatTimes = 1000000
    //average t = 174.666441
    //average c = 376.014834

    @Test
    fun t4_aT0Calculate() {
        aT0Calculate(
            repeatTimes = 1000000,
            sNodeUnit = getCycleBestT2SNodeUnit(),
        )
    }
    //repeatTimes = 1000000
    //average t = 130.056661
    //average c = 160.085334

    @Test
    fun t5_aT0Calculate() {
        aT0Calculate(
            repeatTimes = 1000000,
            sNodeUnit = getT5T2SNodeUnit(),
        )
    }
    //repeatTimes = 1000000
    //average t = 229.973495
    //average c = 629.977506
}